function clearInfo(){
	$("#new_logo").val("");
	$("#new_clour").val("");
	$("#new_place").val("");
	$("#new_other").val("");
	
	
}
/* 创建新用户 */
function addinfo(){
	var params= $("#new_info_form").serialize();
	$.ajax({
		async:false,
		cache:false,
		type:"post",
		
		url:"/ssm-amms/Info/createInfo.action",
		data:params,
		success:function (res){
			if(res){
				alert("创建成功！");
				location.reload();
				
			}else{
				alert("创建失败！");
				
			}
			
		}
	
		
		
	});
	
}
/* 删除用户 */
/* function deleteCustomer(cust_id){
	alert(cust_id);
if(confirm("是否删除？")){
	$.ajax({
		async:false,
		cache:false,
		type:"post",
		url:"/crm-class1/Customer/removeCustById.action",
		data:"cust_id="+cust_id,
		
		success:function (res){
			if(res){
				alert("删除成功！");
				location.reload();
				
				
			}else{
				alert("删除失败");
				
			}
			
		}
		
	});
	
}


	
	
	} */
	/* 删除方法2 */
function deleteInfo(info_customer_carcode){
		
	if(confirm("是否删除大架号："+info_customer_carcode+"？")){
		$.post(
				"/ssm-amms/Info/removeInfoByCarcode.action",
				"info_customer_carcode="+info_customer_carcode,
				function (res){
				if(res){
					alert("删除成功");
					location.reload();
				}else{
					alert("删除失败！");
					
				}
				
			}
		
		
		);
		
	}
	
	
}
	/* 给定位到要修改的用户框给值 */
	function showInfo(info_customer_carcode){
		
		$.post(
			"/ssm-amms/Info/showInfo.action",
			"info_customer_carcode="+info_customer_carcode,
			function (res){
			$("#edit_info_customer_carcode").val(res.info_customer_carcode);
			$("#edit_info_logo").val(res.info_logo);		
			$("#edit_info_clour").val(res.info_clour);		
			$("#edit_info_place").val(res.info_place);		
			$("#edit_info_other").val(res.info_other);		
			
					}
			
			
		);
		
	}

	
	/* 修改维修信息 */
	function editInfo(){
		
		$.post(
				"/ssm-amms/Info/changeInfo.action",
				$("#edit_info_form").serialize(),
				function (res){
					if(res){
						alert("修改成功");
						location.reload();
						
					}else{
						
						alert("修改失败！");
					}
					
				}
		
		
		)
		
	}
